import { MissionCfgBase } from "./Sheets"
import { SheetManager } from "../../ccc3-framework-core/framework/modules/sheetManager";
export class MissionCfg extends MissionCfgBase {
  //id索引
  public static get(id: any) {
    if ((this as any)[id]) return (this as any)[id];
    return SheetManager.get("MissionCfg", id, MissionCfg);
  }

  public static getAll(): MissionCfg[] {
    return SheetManager.getAllSheets("MissionCfg", MissionCfg);
  }

  public static getNextMission(missionId: number): MissionCfg {
    var all = this.getAll();
    var find = all.find(item => item.ID > missionId);
    return find;
  }
}